<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    let number = 0;
    /* 
    console.log(typeof number); // number
    number = !number
    console.log(number); // true
    number = !!number
    console.log(number); // false 
    console.log(Boolean(number)); // false
    
    */

    let string = "wangyang";
    /* 
    console.log(!!string); // true
    console.log(Boolean(string)); //true
 */
    /* 
        let array = [];
        console.log(!![]); // true
        console.log(Boolean([])); // true
         */
    /*   
        let obj = {};
        console.log(!!{});
        console.log(Boolean({}));
        console.log(Boolean(obj));
         */
    /* 
        let date = new Date();
        console.log(!!date); // true
        console.log(Boolean(date)); // true
     */
  </script>
</body>

</html>